import useClipboard from "vue-clipboard3";
import { showFailToast, showSuccessToast } from "vant";

const { toClipboard } = useClipboard();
export const useCopy = async (str: string) => {
	try {
		await toClipboard(str);
		showSuccessToast("复制成功");
	} catch (error) {
		showFailToast("复制失败");
	}
};
